package java_DesignPattern.BehavioralPattern.Chain_of_responsibilityPattern;

/**
 * 处理类
 */
public abstract class Handler {

    public final static int THREE = 3;
    public final static int ONE = 1;
    public final static int SEVEN = 7;
    protected static final int INF = Integer.MAX_VALUE;

    private int start;
    private int end;

    //下一个处理器
    protected Handler nextHandler;

    //构造方法
    public Handler(int start, int end) {
        this.start = start;
        this.end = end;
    }

    //处理方法
    public abstract void handleRequest(Leave leave);

    public void setNextHandler(Handler handler) {
        this.nextHandler = handler;
    }
}
